package model

import uuid "github.com/satori/go.uuid"

type User struct {
	GN_MODEL
	UUID uuid.UUID `gorm:"comment:用户UUID" json:"uuid"`
	Nickname string `gorm:"type:varchar(50);not null;comment:昵称" json:"nickname"`
	Mobile string `gorm:"type:varchar(11);not null;unique;comment:手机号" json:"mobile"`
	Password string `gorm:"type:varchar(32);not null;comment:密码" json:"-"`
	Salt string `gorm:"type:varchar(10);not null;comment:密码加密串" json:"-"`
	Avatar string `gorm:"type:varchar(150);comment:头像" json:"avatar"`
	Sex int8 `gorm:"type:tinyint(2);not null;default:0;comment:性别 0-保密 1-男 2-女" json:"sex"`
	Online int8 `gorm:"type:tinyint(2);not null;default:0;comment:是否在线 0-否 1-是" json:"online"`
	Intro string `gorm:"type:text;comment:简介" json:"intro"`
}